#ifndef _TIMER_
#define _TIMER_

struct timer_call	{
	void (*entry)();
	void (*signal_fn)(void *args,unsigned long signal);
	unsigned long resolution;
	unsigned long ms;	/*Milliseconds after which to call the user*/
	struct timer_call *next;
	int flags;
	unsigned long sig_pid; /*pid of the thread to which we will send a signal*/
};


int add_timer(struct timer_call *t);
int update_timer(struct timer_call *t);
int remove_timer(struct timer_call *t);
void udelay(unsigned long count);
void mdelay(unsigned long count);
void clkdelay(unsigned long count);
void init_timer();
unsigned long cpu_ms();


#define TIMER_FUNCTION 1
#define TIMER_ASYNC_THREAD 2
#define TIMER_ASYNC_FUNCTION 3
#define FLAG_EXP 0


#endif
